﻿using MiniFox.Components;
using MiniFox.Platform.Models;
using MiniFox.Platform.Services;

namespace MiniFox.Platform
{
    /// <summary>
    /// 
    /// </summary>
    [AutoRegister, SpareComponent(typeof(ValidationService))]
    public interface IValidationService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ticket"></param>
        /// <returns></returns>
        bool CheckResult(string ticket);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ticket"></param>
        /// <param name="width"></param>
        /// <param name="height"></param>
        /// <returns></returns>
        byte[] CreateRandomCodeImage(string ticket, int? width, int? height);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ticket"></param>
        /// <returns></returns>
        ValidationContext GetValidContext(string ticket);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="ticket"></param>
        /// <param name="code"></param>
        /// <param name="sync"></param>
        /// <returns></returns>
        bool MatchCode(string ticket, string code, bool sync);
    }
}